package Demo1;

public class Teacher {
        //属性的定义：教师编号、教师姓名、性别、密码、用户类型
        private String teacherNo;
        private String teacherName;
        private String gender;
        private String password;
        private String userType;
        public Teacher(String teacherNo,String teacherName,String gender,String password,String userType){
                this.teacherNo=teacherNo;
                this.teacherName=teacherName;
                this.gender=gender;
                this.password=password;
                this.userType=userType;
        }

        public String getTeacherNo() {
                return teacherNo;
        }

        public void setTeacherNo(String teacherNo) {
                this.teacherNo = teacherNo;
        }

        public String getTeacherName() {
                return teacherName;
        }

        public void setTeacherName(String teacherName) {
                this.teacherName = teacherName;
        }

        public String getGender() {
                return gender;
        }

        public void setGender(String gender) {
                this.gender = gender;
        }

        public String getPassword() {
                return password;
        }

        public void setPassword(String password) {
                this.password = password;
        }

        public String getUserType() {
                return userType;
        }

        public void setUserType(String userType) {
                this.userType = userType;
        }

        //查看信息
        public void displayTeacherInfo(){
            System.out.println("教师信息如下（依次是教师编号、教师姓名、教师性别、用户类型）："+teacherNo+","+teacherName+","+gender+","+userType);
        }

        @Override
        public String toString() {
                return "Teacher{" +
                        "teacherNo='" + teacherNo + '\'' +
                        ", teacherName='" + teacherName + '\'' +
                        ", gender='" + gender + '\'' +
                        ", password='" + password + '\'' +
                        ", userType='" + userType + '\'' +
                        '}';
        }

}
